// general global functions - for examples use only

// shows a tab on examples ui
function showTab(tab, tabBody) {
	// activate this new tab
	var tab = $("#" + tab);
	tab.addClass('active');
	
	// hide other sibblings 
	tab.siblings('li').each(function(){
		$(this).removeClass('active');
	});
	
	// show tabBody
	var tabBody = $("#" + tabBody);
	tabBody.show();
	
	// hide other sibblings 
	tabBody.siblings('div').each(function(){
		$(this).hide();
	});
	
	// set focus
	tabBody.focus();
	
	// return
	return false;
};	

// throw an error
function throwError() {
	throw "This is an error";
	
	// return
	return false;
};
